package homework;
import java.util.*;

/**
 * 判断三角形
 * @胡承伦
 *
 */
class ThrowException{
public static void isTriangle(int a,int b,int c) throws IllegalArgumentException
        {
            if (a + b > c && b + c > a && a + c > b) {
            System.out.println("a=" + a);
            System.out.println("b=" + b);
            System.out.println("c=" + c);
        } else {
            throw new IllegalArgumentException();
        }
    }
}
public class Triangle extends ThrowException{//判断三角形；
    public static void main(String[] args) {
        Scanner k = new Scanner(System.in);
        ThrowException l=new ThrowException();
        int a = k.nextInt();
        int b = k.nextInt();
        int c = k.nextInt();
        try {
            l.isTriangle(a, b, c);
        } catch (IllegalArgumentException ex) {
            System.out.println("异常" + ex);
            System.out.println("a,b,c不能构成三角形");
        }
    }
}
